<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:javascrtpt="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>易居</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="/js/jquery.tmpl.js"></script>
    <style>
        body {
            background-color: #f5f5f5;
        }
    </style>

</head>
<body style="overflow-x: hidden">
<nav th:replace="~{topbar::top}"></nav>
<!--<nav th:replace="~{/agentPage/commonbar::middle}"></nav>-->

<script id="each1" type="text/x-jquery-tmpl">
    <div class="container">
    <div class="col-sm-12">
        <div class="row">
            <div class="col-md-9">
                <ul>
                    <li class="row" style="list-style: none; padding: 30px">
                        <img class="col-md-4" src="${picture}">
                        <div class="col-md-8">
                            <input id="houseId" type="hidden" value="${houseId}">
                            <h5><a style="color: black; text-decoration: none;" href="/house_detail?houseId=${houseId}">${houseName}</a></h5>
                            <div class="row">
                                <h5 class="col-md-12">
                                    <a style="color: black; text-decoration: none" href="#">${estateName}</a>
                                    <span>${scale}</span>|
                                    <span>${orientation}</span>|
                                    <span>${decoration}</span>|
                                    {{if hasLift}}
                                    <span>有电梯</span>
                                    {{else}}
                                    <span>无电梯</span>
                                    {{/if}}
                                </h5>
                            </div>
                            <div class="row">
                                <h5 class="col-md-12">
                                    <span>${floor}</span>
                                </h5>
                            </div>
                            <div class="row">
                                <h5 class="col-md-12">
                                    <span>面积：</span>
                                    <span>${houseArea}</span>
                                    <span>平</span>
                                </h5>
                            </div>
                            <div class="row">
                                <h5 class="col-md-12">
                                    <span>价格：</span>
                                    <span>${price}</span>
                                    <span>万</span>
                                </h5>
                            </div>
                            <div class="row">
                                <h5 class="col-md-12">
                                    <span>${createTime}</span>
                                </h5>
                            </div>

                        </div>
                    </li>
                </ul>
            </div>
            <div class="col-md-2" style="padding-top: 40px">
                <div class="container" style="list-style: none">
                    <div class="row">
                        <h3 class="col-md-12">
                            <span class="glyphicon glyphicon-star-empty" aria-hidden="true"></span>
                            {{if status}}
                            <span style="color: #db4c3f; font-weight: bold; display: inline">已审核</span>
                            {{else}}
                            <span style="color: #db4c3f; font-weight: bold; display: inline">未审核</span>
                            {{/if}}
                        </h3>
                    </div>
                </div>

            </div>
            <div class="col-md-1" style="padding-top: 40px">
                <div class="container" style="list-style: none;padding: 10px">
                     <button id="modify" onclick="javascrtpt:window.location.href='/update_house_before?houseId=${houseId}'" type="button" class="btn btn-primary">修改</button>

                </div>
                <div class="container" style="list-style: none;padding: 10px">
                    <button id="modify" onclick="javascrtpt:window.location.href='/delete_house?houseId=${houseId}'" type="button" class="btn btn-danger">删除</button>
                </div>
            </div>
            <hr style="background-color: aliceblue; height: 2px; width: 1130px; margin: unset; border: unset">
        </div>

    </div>
</div>



</script>

<script id="each2" type="text/x-jquery-tmpl">
    <div class="container">
    <div class="row" style="padding-top: 20px">
        <div class="col-md-8">
            <h4>
                <span style="color: black; text-decoration: none; padding-right: 20px">带看房源：</span>
                <a style="color: black; text-decoration: none;" href="#4" >${house.houseName}</a>
            </h4>
            <h4 style="color: #db4c3f;   text-decoration: none;"><span style="padding-right: 30px">预约时间：</span><span>${orderTime}</span></h4>
            <h4 style="color: black;   text-decoration: none;"><span style="padding-right: 30px;">客户备注：</span><span>${remark}</span></h4>
        </div>
        <div class="col-md-4" style="padding-top: 10px">
            <h4 style="color: black;   text-decoration: none;"><span style="padding-right: 30px">客户名称：</span><span>${user.userName}</span></h4>
            <h4 style="color: black;   text-decoration: none;"><span style="padding-right: 30px">联系方式：</span><span>${user.telephone}</span></h4>
        </div>
        <hr style="background-color: aliceblue; height: 2px; width: 1130px; margin: unset; border: unset">
    </div>
</div>

</script>

<script id="each3" type="text/x-jquery-tmpl">
        <div class="container">
                <div class="row">
                    <div class="col-md-9">
                        <ul>
                            <li class="row" style="list-style: none; padding-left: 30px;padding-top:10px">
                                <div class="col-md-9">
                                    <span style="font-weight: bold">用户评分：</span>
                                    <h4 style="color: #db4c3f; font-weight: bold; display: inline">
                                    {{if star==1}}
                                        <span class="glyphicon glyphicon-star" style="size:A3" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                    {{else star==2}}
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                    {{else star==3}}
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                     {{else star==4}}
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star-empty" style="size:A4" aria-hidden="true"></span>
                                      {{else star==5}}
                                          <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                        <span class="glyphicon glyphicon-star" style="size:A4" aria-hidden="true"></span>
                                     {{/if}}
                                    </h4>
                                    <div class="row">
                                        <h5 class="col-md-12">
                                            <span style="color: grey">用户：</span>
                                            <span style="color: grey">${userId}</span>
                                        </h5>
                                    </div>
                                    <div class="row">
                                        <h5 class="col-md-12" style="padding-top: 10px;padding-bottom: 10px">
                                            <span style="font-size: large">${content}</span>
                                        </h5>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="col-md-2" style="padding-top: 10px">
                        <div class="container" style="list-style: none">
                            <h5 style="display: inline">${commentTime}</h5>
                        </div>
                    </div>
                </div>
                <hr style="background-color: aliceblue; height: 2px; width: 1130px; margin: unset; border: unset">
            </div>

    </script>

<script id="information" type="text/x-jquery-tmpl">
    <div class="jumbotron" style="height: 10rem; background-image: url(static/images/back01.jpg);">
    <div class="text-center">
        <span style="font-size: 33px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">编辑个人信息</span>
    </div>
</div>

<form class="form-inline" action="/update_agent_after" method="post">
    <input type="hidden" name="agentId" value="${agentId}" >
    <div class="container" style="padding-top: 20px">
        <div class="row form-group" style="padding-left: 20rem">
            <label for="agentName" style="padding-right: 60px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                名字
            </label>
            <input type="text"  name="agentName" class="form-control" id="agentName" value="${agentName}" placeholder="请输入您的名字" style="width: 50rem">
        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        <div class="row form-group" style="padding-left: 20rem">
            <label style="padding-right: 60px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                性别
            </label>
            {{if sex}}
             <input type="text" readonly value="男" class="form-control" id="sex" placeholder="男/女" style="width: 50rem">
             {{else}}
             <input type="text" readonly value="女" class="form-control" id="sex" placeholder="男/女" style="width: 50rem">
             {{/if}}
        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        <div class="row form-group" style="padding-left: 20rem">
            <label style="padding-right: 30px; display:inline;font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                联系电话
            </label>
            <input  type="text" name="telephone" value="${telephone}" class="form-control" id="telephone" placeholder="请输入您的电话" style="width: 50rem">

        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        <div class="row form-group" style="padding-left: 20rem">
            <label for="email" style="padding-right: 60px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                邮箱
            </label>
            <input type="text" name="email" class="form-control" value="${email}" id="email" placeholder="请输入您的邮箱" style="width: 50rem">
        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        <div class="row form-group" style="padding-left: 20rem">
            <label for="belong_shop" style="padding-right: 30px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                所属门店
            </label>
            <input type="text" readonly value="${belongShop}" name="belongShop" class="form-control" id="belong_shop" placeholder="请输入所属门店" style="width: 50rem">
        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        <div class="row form-group" style="padding-left: 20rem">
            <label style="padding-right: 60px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                城市
            </label>
            <input type="text" readonly value="${city}" name="city" class="form-control" id="city" placeholder="请输入城市" style="width: 50rem">

        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        <div class="row form-group" style="padding-left: 20rem">
            <label style="padding-right: 60px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                自评
            </label>
            <textarea  name="selfAssessment"  class="form-control" id="self_assessment" placeholder="请输入自评" style="width: 50rem">${selfAssessment}</textarea>
        </div>
        <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>

    </div>
    <div class="container">
        <div class="row text-center">
            <button type="submit" class="btn btn-primary" style="margin-right: 50px; width: 90px; margin-bottom: 40px">提交修改</button>

        </div>
    </div>

</form>



</script>

<script id="pageview" type="text/x-jquery-tmpl">
        <div class="row">
            <nav style="text-align: right" aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <a href="#" aria-label="Previous" id="first">
                            <span aria-hidden="true">首页</span>
                        </a>
                    </li>

                    <li >
                        <a href="#" id="pre" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>

                    <li ><a id="text" style="color: black">第${current}页/共${pages}页</a></li>
                    <li >
                        <a href="#" id="next" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span></a>
                    </li>

                    <li>
                        <a href="#" id="final">
                            <span aria-hidden="true" >末页</span>
                        </a>
                    </li>

                </ul>
            </nav>
        </div>



</script>


<script>
    var hasNextPage;
    var hasPrePage;
    var agentId;
    var current;
    var sumpage;

    $(function () {

        $("#tap1").click(function () {
            agentId = $("#agengId").val();
            $.ajax({
                type: "get",
                url: "/ajax_house_list?showAll=true&agentId=" + agentId,
                dataType: "json",
                success: populate
            });

            function populate(data) {
                console.log(data);
                hasNextPage = eval('data.hasNextPage');
                hasPrePage = eval('data.hasPrePage');
                current = eval('data.current');
                sumpage = eval('data.pages');
                console.log(eval('data.result'));
                $('#content').html('');
                $('#each1').tmpl(eval('data.result')).appendTo('#content');
                $('#page').html('');
                $('#pageview').tmpl(data).appendTo('#page');

                $("#next").click(function () {
                    if (hasNextPage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_house_list?showAll=true&agentId=" + agentId + "&page=" + (++current),
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each1').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
                $("#pre").click(function () {
                    console.log(hasPrePage);
                    if (hasPrePage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_house_list?showAll=true&agentId=" + agentId + "&page=" + (--current),
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each1').tmpl(eval('data.result')).appendTo('#content');
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                            /*$('#pageview').tmpl(data).replaceAll('#page');*/
                        }

                    }
                })
                $("#first").click(function () {
                    if (current != 1) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_house_list?showAll=true&agentId=" + agentId + "&page=" + 1,
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each1').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
                $("#final").click(function () {
                    if (hasNextPage && current != sumpage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_house_list?showAll=true&agentId=" + agentId + "&page=" + sumpage,
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each1').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });


            }
        });
        $('#tap1').trigger("click");

        $("#tap2").click(function () {
            agentId = $("#agengId").val();
            $.ajax({
                type: "get",
                url: "/ajax_appointment_list?agentId=" + agentId,
                dataType: "json",
                success: populate
            });

            function populate(data) {
                console.log(data);
                hasNextPage = eval('data.hasNextPage');
                hasPrePage = eval('data.hasPrePage');
                current = eval('data.current');
                sumpage = eval('data.pages');
                console.log(eval('data.result'));
                $('#content').html('');
                $('#each2').tmpl(eval('data.result')).appendTo('#content');
                $('#page').html('');
                $('#pageview').tmpl(data).appendTo('#page');

                $("#next").click(function () {
                    if (hasNextPage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_appointment_list?agentId=" + agentId + "&page=" + (++current),
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each2').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
                $("#pre").click(function () {
                    console.log(hasPrePage);
                    if (hasPrePage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_appointment_list?agentId=" + agentId + "&page=" + (--current),
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each2').tmpl(eval('data.result')).appendTo('#content');
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                            /*$('#pageview').tmpl(data).replaceAll('#page');*/
                        }

                    }
                })
                $("#first").click(function () {
                    if (current != 1) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_appointment_list?agentId=" + agentId + "&page=" + 1,
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each2').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
                $("#final").click(function () {
                    if (hasNextPage && current != sumpage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_appointment_list?agentId=" + agentId + "&page=" + sumpage,
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each2').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });


            }
        });

        $("#tap3").click(function () {
            agentId = $("#agengId").val();
            $.ajax({
                type: "get",
                url: "/update_agent_before?agentId=" + agentId,
                dataType: "json",
                success: populate
            });

            function populate(data) {
                console.log(data);
                $('#content').html('');
                $('#information').tmpl(data).appendTo('#content');
                $('#page').html('');
            }
        });

        $("#tap4").click(function () {
            agentId = $("#agengId").val();
            $.ajax({
                type: "get",
                url: "/ajax_comment_list?agentId=" + agentId,
                dataType: "json",
                success: populate
            });

            function populate(data) {
                console.log(data);
                hasNextPage = eval('data.hasNextPage');
                hasPrePage = eval('data.hasPrePage');
                current = eval('data.current');
                sumpage = eval('data.pages');
                //模板   绑定    数据      添加到   指定的div或者是容器里面
                $('#content').html('');
                $('#each3').tmpl(eval('data.result')).appendTo('#content');
                $('#page').html('');
                $('#pageview').tmpl(data).appendTo('#page');

                $("#next").click(function () {
                    if (hasNextPage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_comment_list?agentId=" + agentId + "&page=" + (++current),
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each3').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
                $("#pre").click(function () {
                    console.log(hasPrePage);
                    if (hasPrePage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_comment_list?agentId=" + agentId + "&page=" + (--current),
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each3').tmpl(eval('data.result')).appendTo('#content');
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                            /*$('#pageview').tmpl(data).replaceAll('#page');*/
                        }

                    }
                })
                $("#first").click(function () {
                    if (current != 1) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_comment_list?agentId=" + agentId + "&page=" + 1,
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each3').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
                $("#final").click(function () {
                    if (hasNextPage && current != sumpage) {
                        $.ajax({
                            type: "get",
                            url: "/ajax_comment_list?agentId=" + agentId + "&page=" + sumpage,
                            dataType: "json",
                            success: solve
                        });

                        function solve(data) {
                            hasNextPage = eval('data.hasNextPage');
                            hasPrePage = eval('data.hasPrePage');
                            current = eval('data.current');
                            console.log(data);
                            console.log(hasPrePage);
                            console.log(hasNextPage);
                            //模板   绑定    数据      添加到   指定的div或者是容器里面
                            $('#content').html('');
                            $('#each3').tmpl(eval('data.result')).appendTo('#content');
                            /* $('#pageview').tmpl(data).replaceAll('#page');*/
                            $("#text").text("第" + current + "页/共" + sumpage + "页");
                        }

                    }
                });
            }


        });
    });
</script>
<div class="jumbotron" style="background-image: url(/images/back01.jpg);" th:fragment="middle">
    <div class="container">
        <div class="row">
            <h4 class="col-md-5">Welcome,<span th:text="${agent.agentName}"></span>!</h4>
            <ul>
                <li style="padding-right: 60px; list-style: none; display: inline-block"><h4><a href="#" id="tap1"
                                                                                                style="color: black; text-decoration: none">已发布的房源</a>
                </h4></li>
                <li style="padding-right: 60px; list-style: none; display: inline-block"><h4><a href="#" id="tap2"
                                                                                                style="color: black; text-decoration: none">客户看房行程</a>
                </h4></li>
                <li style=" padding-right: 60px; list-style: none; display: inline-block"><h4><a href="#" id="tap3"
                                                                            style="color: black; text-decoration: none">编辑个人信息</a>
                </h4></li>
                <li style=" list-style: none; display: inline-block"><h4><a href="#" id="tap4"
                                                                            style="color: black; text-decoration: none">查看评价</a>
                </h4></li>
            </ul>
        </div>
    </div>
</div>

<div>
    <input id="agengId" type="hidden" th:value="${agent.agentId}">

    <div id="content"></div>
    <div class="container">
        <div id="page"></div>
    </div>
</div>


</body>
</html>